package com.iversonx.bridge.example_1.v3.msg.common;

import com.iversonx.bridge.example_1.v3.msg.MessageService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 发送消息至邮箱
 **/
public class EmailMessageServiceImpl implements MessageService {
    private static final Logger LOGGER = LoggerFactory.getLogger(
            EmailMessageServiceImpl.class);
    
    @Override
    public boolean support(String type) {
        return "email".equalsIgnoreCase(type);
    }
    
    @Override
    public void send(String message, String toUser) {
        LOGGER.info("发送消息[{}]至{}的邮箱", message, toUser);
    }
}
